//
//  TKIMCacheHelper.h
//  TKIM
//
//  Created by liupm on 15/10/28.
//  Copyright © 2015年 liupm. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface TKIMCacheHelper : NSObject

/**
 *  @Author lpm, 15-10-28 12:10:49
 *
 *  @brief  缓存
 *
 *  @param value
 *  @param key
 */
+(void)setValue:(id)value forKey:(NSString *)key;


/**
 *  @Author lpm, 15-10-28 12:10:28
 *
 *  @brief  返回对象
 *
 *  @param key
 *
 *  @return
 */
+(id)valueForKey:(NSString *)key;


/**
 *  @Author lpm, 15-10-28 12:10:47
 *
 *  @brief  返回整型
 *
 *  @param defaultName
 *
 *  @return
 */
+ (NSInteger)integerForKey:(NSString *)defaultName;

/**
 *  @Author lpm, 15-10-28 12:10:47
 *
 *  @brief  返回浮点数
 *
 *  @param defaultName
 *
 *  @return
 */
+ (float)floatForKey:(NSString *)defaultName;

/**
 *  @Author lpm, 15-10-28 12:10:47
 *
 *  @brief  返回double
 *
 *  @param defaultName
 *
 *  @return
 */
+ (double)doubleForKey:(NSString *)defaultName;

/**
 *  @Author lpm, 15-10-28 12:10:47
 *
 *  @brief  返回布尔
 *
 *  @param defaultName
 *
 *  @return
 */
+ (BOOL)boolForKey:(NSString *)defaultName;

/**
 *  @Author lpm, 15-10-28 12:10:47
 *
 *  @brief  返回url
 *
 *  @param defaultName
 *
 *  @return
 */
+ (NSURL *)URLForKey:(NSString *)defaultName;


/**
 *  @Author lpm, 15-10-28 12:10:47
 *
 *  @brief  缓存整型
 *
 *  @param defaultName
 *
 *  @return
 */
+ (void)setInteger:(NSInteger)value forKey:(NSString *)defaultName;

/**
 *  @Author lpm, 15-10-28 12:10:47
 *
 *  @brief  缓存浮点数
 *
 *  @param defaultName
 *
 *  @return
 */
+ (void)setFloat:(float)value forKey:(NSString *)defaultName;

/**
 *  @Author lpm, 15-10-28 12:10:47
 *
 *  @brief  缓存double
 *
 *  @param defaultName
 *
 *  @return
 */
+(void)setDouble:(double)value forKey:(NSString *)defaultName;

/**
 *  @Author lpm, 15-10-28 12:10:47
 *
 *  @brief  缓存布尔
 *
 *  @param defaultName
 *
 *  @return
 */
+ (void)setBool:(BOOL)value forKey:(NSString *)defaultName;

/**
 *  @Author lpm, 15-10-28 12:10:47
 *
 *  @brief  缓存url
 *
 *  @param defaultName
 *
 *  @return
 */
+ (void)setURL:(NSURL *)url forKey:(NSString *)defaultName;



/**
 *  @Author lpm, 15-10-28 12:10:26
 *
 *  @brief  删除缓存
 *
 *  @param defaultName
 */
+ (void)removeObjectForKey:(NSString *)defaultName;
@end
